package com.bsoft.gol.hcs.specialist.dao;

import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import com.bsoft.gol.hcs.specialist.entity.FollowUpRecordsRequisition;
import org.atag.dao.ext.HibernateExtendDAO;

import java.util.List;

/**
 * 随访关联表单表(FollowUpRecordsRequisition)表数据库访问层
 *
 * @author neoLin
 * @since 2022-07-15 16:10:15
 */
public abstract class FollowUpRecordsRequisitionDAO extends HibernateExtendDAO<FollowUpRecordsRequisition> {


    @DAOMethod(sql =" from FollowUpRecordsRequisition where recordId=:recordId" )
    public abstract List<FollowUpRecordsRequisition> findQuestionByRecordId(@DAOParam("recordId")Long recordId);

    @DAOMethod(sql =" delete from FollowUpRecordsRequisition where formId in (:formIds)" )
    public abstract void removeByFormIds(@DAOParam("formIds")List<String> formIds);

    @DAOMethod(sql =" from FollowUpRecordsRequisition where recordId=:recordId and questionnaireId=:questionnaireId" )
    public abstract List<FollowUpRecordsRequisition> findQuestionByRecordIdAndQuestionnaireId(@DAOParam("recordId")Long recordId,@DAOParam("questionnaireId")String questionnaireId);


}


